home *** CD-ROM | disk | FTP | other *** search
/ Amiga Magazin: Amiga-CD 1996 March / Amiga-CD 1996 #3.iso / pd-software / mui_3.1 / developer / autodocs / mui_string.doc < prev    next >
Text File  |  1996-01-19  |  6KB  |  242 lines

  1. TABLE OF CONTENTS
  2.  
  3. String.mui/String.mui
  4. String.mui/MUIA_String_Accept
  5. String.mui/MUIA_String_Acknowledge
  6. String.mui/MUIA_String_AdvanceOnCR
  7. String.mui/MUIA_String_AttachedList
  8. String.mui/MUIA_String_BufferPos
  9. String.mui/MUIA_String_Contents
  10. String.mui/MUIA_String_DisplayPos
  11. String.mui/MUIA_String_EditHook
  12. String.mui/MUIA_String_Format
  13. String.mui/MUIA_String_Integer
  14. String.mui/MUIA_String_LonelyEditHook
  15. String.mui/MUIA_String_MaxLen
  16. String.mui/MUIA_String_Reject
  17. String.mui/MUIA_String_Secret
  18. String.mui/String.mui
  19.  
  20.     String class generates standard string gadgets with
  21.     all editing facilities (clear, undo, etc.) enabled.
  22. String.mui/MUIA_String_Accept
  23.  
  24.     NAME
  25.     MUIA_String_Accept -- (V4 ) [ISG], STRPTR
  26.  
  27.     FUNCTION
  28.     A string containing characters allowed as input
  29.     for the string gadget. Whenever the user hits a
  30.     character not found in MUIA_String_Accept, he
  31.     will hear a beep and gadgets contents won't have 
  32.     changed.
  33.  
  34.     EXAMPLE
  35.     StringObject,
  36.        MUIA_String_Accept, "0123456789-",
  37.        End,
  38.  
  39.     SEE ALSO
  40.     MUIA_String_Reject
  41. String.mui/MUIA_String_Acknowledge
  42.  
  43.     NAME
  44.     MUIA_String_Acknowledge -- (V4 ) [..G], STRPTR
  45.  
  46.     FUNCTION
  47.     This attribute will be set to the contents of the
  48.     string whenever the user hits return in the gadget. 
  49.     An application can listen with notification and take
  50.     the appropriate action.
  51.  
  52.     Using the TAB key or a mouse click to deactivate the
  53.     gadget will not trigger MUIA_String_Acknowledge.
  54.  
  55.     EXAMPLE
  56.     /* two string gadgets str1 and str2, the second should
  57.     /* become active after a return in the first: */
  58.  
  59.     DoMethod(str1,MUIM_Notify,
  60.        MUIA_String_Acknowledge, MUIV_EveryTime,
  61.        windowobj, 3, MUIM_Set, MUIA_Window_ActiveObject, str2);
  62.  
  63.     SEE ALSO
  64.     MUIA_String_Contents
  65. String.mui/MUIA_String_AdvanceOnCR
  66.  
  67.     NAME
  68.     MUIA_String_AdvanceOnCR -- (V11) [ISG], BOOL
  69.  
  70.     FUNCTION
  71.     Set this if you want carriages returns in string gadgets
  72.     behave like the TAB key, i.e. pressing CR will activate
  73.     the next/previous gadget in the cycle chain.
  74.  
  75.     SEE ALSO
  76.     Notify.mui/MUIA_CycleChain
  77. String.mui/MUIA_String_AttachedList
  78.  
  79.     NAME
  80.     MUIA_String_AttachedList -- (V4 ) [I..], Object *
  81.  
  82.     FUNCTION
  83.     This special attribute can be set to point to
  84.     a valid MUI object of List or Listview class.
  85.     This enables controlling the lists cursor
  86.     from within the string gadget, all cursor key
  87.     events will be forwarded.
  88.  
  89.     SEE ALSO
  90.     MUIA_String_Contents, MUIA_List_Active
  91. String.mui/MUIA_String_BufferPos
  92.  
  93.     NAME
  94.     MUIA_String_BufferPos -- (V4 ) [.S.], LONG
  95.  
  96.     FUNCTION
  97.     MUIA_String_BufferPos can be used to get and set the
  98.     position of the cursor in the string gadget.
  99.     This attribute is probably not very interesting.
  100.  
  101.     SEE ALSO
  102.     MUIA_String_Contents, MUIA_String_DisplayPos
  103. String.mui/MUIA_String_Contents
  104.  
  105.     NAME
  106.     MUIA_String_Contents -- (V4 ) [ISG], STRPTR
  107.  
  108.     FUNCTION
  109.     Get and set a string gadgets contents. You may not
  110.     modify the returned string.
  111.  
  112.     MUIA_String_Contents gets updated every time when
  113.     the contents of the string gadget change. When you
  114.     set up a notification on this attribute, you will
  115.     hear about every keystroke.
  116.  
  117.     EXAMPLE
  118.  
  119.     /* The given hook will be called after every change */
  120.     /* in the string gadget. It receives a pointer to   */
  121.     /* a pointer to the current contents in register a1 */
  122.     /* (see MUIM_CallHook for details)                  */
  123.  
  124.     DoMethod(str,MUIM_Notify,
  125.        MUIA_String_Contents, MUIV_EveryTime,
  126.        str, 3, MUIM_CallHook, &hook, MUIV_TriggerValue);
  127.  
  128.     SEE ALSO
  129.     MUIA_String_Accept, MUIA_String_Reject, MUIA_String_MaxLen
  130. String.mui/MUIA_String_DisplayPos
  131.  
  132.     NAME
  133.     MUIA_String_DisplayPos -- (V4 ) [.S.], LONG
  134.  
  135.     FUNCTION
  136.     MUIA_String_DisplayPos can be used to get and set the
  137.     number of the first character of the string to be
  138.     displayed. This attribute is probably not very
  139.     interesting.
  140.  
  141.     SEE ALSO
  142.     MUIA_String_Contents, MUIA_String_BufferPos
  143. String.mui/MUIA_String_EditHook
  144.  
  145.     NAME
  146.     MUIA_String_EditHook -- (V7 ) [ISG], struct Hook *
  147.  
  148.     FUNCTION
  149.     When specified, MUI calls this hook as if it was a real
  150.     string edit hook in a real string gadget. It receives
  151.     a pointer to itself in A0, a pointer to a SGWork structure
  152.     in A2 and a pointer to the message in A1.
  153.  
  154.     The hook will be called before MUI's private edit hook,
  155.     the result is unused.
  156. String.mui/MUIA_String_Format
  157.  
  158.     NAME
  159.     MUIA_String_Format -- (V4 ) [I.G], LONG
  160.  
  161.     SPECIAL INPUTS
  162.     MUIV_String_Format_Left
  163.     MUIV_String_Format_Center
  164.     MUIV_String_Format_Right
  165.  
  166.     FUNCTION
  167.     Used to adjust the alignment of the input string.
  168.  
  169.     SEE ALSO
  170.     MUIA_String_BufferPos, MUIA_String_DispPos, MUIA_String_Contents
  171. String.mui/MUIA_String_Integer
  172.  
  173.     NAME
  174.     MUIA_String_Integer -- (V4 ) [ISG], ULONG
  175.  
  176.     FUNCTION
  177.     Useful for turning a string gadget into an integer
  178.     gadget. Setting this attribute puts the value
  179.     with "%ld" into the gadget, getting it returns
  180.     a longword containing the string gadgets contents
  181.     as number.
  182.  
  183.     You should set MUIA_String_Accept to "0123456789"
  184.     or something like that to avoid wrong characters.
  185.  
  186.     EXAMPLE
  187.     StringObject,
  188.        MUIA_String_Accept , "0123456879",
  189.        MUIA_String_Integer, 42,
  190.        End;
  191. String.mui/MUIA_String_LonelyEditHook
  192.  
  193.     NAME
  194.     MUIA_String_LonelyEditHook -- (V11) [ISG], BOOL
  195.  
  196.     FUNCTION
  197.     If your string object has an edit hook, you can set
  198.     this to TRUE to skip MUI's private edit hook completely.
  199.     Otherwise, your hook will be executed and the MUIs.
  200. String.mui/MUIA_String_MaxLen
  201.  
  202.     NAME
  203.     MUIA_String_MaxLen -- (V4 ) [I.G], LONG
  204.  
  205.     FUNCTION
  206.     Setup the maximum length for the string gadget.
  207.     This attribute is only valid at object creation time.
  208.  
  209.     Default maximum length is 80.
  210.  
  211.     NOTE: The maximum length includes the 0-byte at the end
  212.           of the string. To let the user enter e.g. 10 characters,
  213.           you would have to specify a maxlen of 11.
  214.  
  215.     SEE ALSO
  216.     MUIA_String_Contents
  217. String.mui/MUIA_String_Reject
  218.  
  219.     NAME
  220.     MUIA_String_Reject -- (V4 ) [ISG], STRPTR
  221.  
  222.     FUNCTION
  223.     A string containing characters that should not be
  224.     accepted as input for the string gadget. Whenever
  225.     the user hits such a char, he will hear a beep
  226.     and gadgets contents won't have changed.
  227.  
  228.     SEE ALSO
  229.     MUIA_String_Accept
  230. String.mui/MUIA_String_Secret
  231.  
  232.     NAME
  233.     MUIA_String_Secret -- (V4 ) [I.G], BOOL
  234.  
  235.     FUNCTION
  236.     This attribute causes the string gadget to display only
  237.     dots instead of the real contents. Useful for password
  238.     requesters.
  239.  
  240.     SEE ALSO
  241.     MUIA_String_Contents
  242.